<script setup lang="ts">

import MdEditor from "@/components/MdEditor.vue";
import {ref} from "vue";
import CodeEditor from "@/components/CodeEditor.vue";

const mdValue = ref()
const codeValue = ref()
const mdHandleChange = (v: string) => {
  mdValue.value = v
  console.log(v)
}

const codeHandleChange = (v: string) => {
  codeValue.value = v
  console.log(v)
}
</script>

<template>
  <h1>主页</h1>
  <MdEditor :value="mdValue" :handle-change="mdHandleChange"></MdEditor>
  <CodeEditor :value="codeValue" :handle-change="codeHandleChange"></CodeEditor>
  {{value}}
</template>

<style scoped lang="less">

</style>
